<?php
class DataSourceContext {
	protected $dsObj;
	
	public function __construct($type) {
		$clz = ucfirst($type) . 'DataSource';
		if(!class_exists($clz))  DataException::throwEx("DataSource: {$type} not found!");
		$this->dsObj = new $clz();
	}
	
	public function getDataSource() {
		return $this->dsObj;
	}
	
	public function handle($defineCfg) {
		return $this->dsObj->handle($defineCfg);
	}
}

final class DSC extends DataSourceContext {}
?>